from jinja2 import Template

def Refresh(target, context):
    if target is None:
        return None

    return Template(str(target)).render(context)

#"""
if __name__ == '__main__':
    target = "你好{{name}}"
    context = {'name':123}
    rs = Refresh(target, context)
    rs_1 = eval('context')
    rs_2 = str('rs_1')
    print(type(rs))
    print (type (rs_1))
    print (type (rs_2))


#"""